/*
 *  dna_math.h -- provide dna-system math library implementation.
 *  Given that some CPU performance, such as division operation is very slowly,
 *  So we convert these operation to addition/multiplication/shift.
 *
 *  ORIGINAL AUTHOR: Xu Chun (chun.xu@broadlink.com.cn)
 *
 *  Copyright (c) 2016 Broadlink Corporation
 */

#ifndef __DNA_MATH_H
#define __DNA_MATH_H

#include "dna_compiler.h"

/*
*  division operation.
*  [input]  : dividend and divisor
*  [output]: quotient and remainder
*/
void dna_div(
        unsigned int dividend, unsigned int divisor,
        unsigned int * quotient, unsigned int * remainder) DNA_COMPILER_SECTION_SRAM;

#endif

